package org.idea.spring.aop.cglib.proxy;

import org.idea.spring.aop.cglib.MyBis;

import java.lang.reflect.Method;
import java.util.Map;

/**
 * @Author linhao
 * @Date created in 5:00 下午 2021/5/6
 */
public class MyBisEnhancerClass$CGLIB extends MyBis {

    public Object source;
    public MyMethodInterceptor myMethodInterceptor;
    public Map<String,Method> methodMap;
    public MyMethodProxy myMethodProxy;

    public void setMyMethodProxy(MyMethodProxy myMethodProxy) {
        this.myMethodProxy = myMethodProxy;
    }

    public void setMyMethodInterceptor(MyMethodInterceptor myMethodInterceptor) {
        this.myMethodInterceptor = myMethodInterceptor;
    }

    public void setSource(Object source) {
        this.source = source;
    }

    public void setMethodMap(Map<String, Method> method) {
        this.methodMap = method;
    }

    @Override
    public void doBus() {
        myMethodInterceptor.doInterceptor(source,methodMap.get("doBus"),null,myMethodProxy);
    }

}
